<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <meta name="copyright" content=
    "Copyright (c) IBM Corporation and others 2010, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type=
    "text/css" />
    <script language="JavaScript" src=
    "PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript">
</script>
    <title>
      Using AbstractHelpScope to filter an information center
    </title>

  </head>
  <body>
    <h2>
      Using AbstractHelpScope to filter an information center
    </h2>
    <p>
      An information center can be used to serve information for more than one
      product. Using the <a href=
      "../reference/api/org/eclipse/help/base/AbstractHelpScope.html">AbstractHelpScope</a>
      class it is possible to define documentation subsets called help scopes
      which allow for users to see only the information which applies to one or
      more specific products.
    </p>

    <p>
      A help scope consists of an id and a class which subclasses
      AbstractHelpScope and is defined in the extension point <a href=
      "../reference/extension-points/org_eclipse_help_base_scope.html">org.eclipse.ua.help.base.scope</a>.
      The AbstractHelpScope class contains methods for determining whether a
      table of contents, topic or index entry should be included in the scope.
      Once a help scope with an id of myId has been declared it can be applied
      by opening an infocenter with a url of this form:
    </p>
    <pre>
http://&lt;host&gt;:&lt;port&gt;/help/index.jsp?scope=myId
</pre>This will present an infocenter which shows only those topics which fall
within the scope myId.
    <p>
      Scopes can be joined together to retrieve the intersection or union of
      multiple scopes. A basic query language can be used to perform these
      multi-scope operations.
    </p>

    <dl>
      <dt>
        Examples:
      </dt>
      <dt>
        Filter help info to include anything in A,B, or C:
      </dt>
      <dd>
        scope=A|B|C
      </dd>

      <dd>
        scope=(A|B|C)
      </dd>
      <dt>
        Filter help info to include anything in A,B, and C:
      </dt>
      <dd>
        scope=A^B^C
      </dd>
      <dd>

        scope=(A^B^C)
      </dd>
      <dd>
        scope=A&amp;scope=B&amp;scope=C
      </dd>
      <dt>
        Filter help to include A or B, and C:
      </dt>
      <dd>

        scope=(A|B)^C
      </dd>
      <dd>
        scope=A|B&amp;scope=C
      </dd>
      <dd>
        <b>Note:</b> (A|B^C) will not be recognized by the parser, and will
        only use the last operation, so it will look like (A^B^C)
      </dd>
      <dt>

        Filter help to include A and B, or, A and C:
      </dt>
      <dd>
        scope=(A^B)|(A^C)
      </dd>
    </dl>The URL character for 'and' (intersection) is '^', and 'or' (union) is
    '|'.
  </body>
</html>
